package com;

public class DataConver {
    static public void main(String[] argv) {

//        int b = -10;
//
//        byte[] data = toByteArray(b);
//        int a = 0;
//        a = 0;
//
//        int value = Integer.valueOf("-020");
//         a = 0;
//
//         double v = 1400000000l*1.3f;
//
//         a=0;
//    }
//
//    public static byte[] toByteArray(int i32) {
//        byte[] regs = new byte[4];
//        regs[0] = (byte) (0xff & (i32 >> 24));
//        regs[1] = (byte) (0xff & (i32 >> 16));
//        regs[2] = (byte) (0xff & (i32 >> 8));
//        regs[3] = (byte) (0xff & i32);
//
//        return regs;

        byte[] valueByte = toLHByteArray(1820000000);

//        byte[] valueByte = new byte[4];
//
//        valueByte[0] = 0x00;
//        valueByte[1] = (byte) 0xFF;
//        valueByte[2] = 0x7A;
//        valueByte[3] = 0x6C;

        int one = (0xff & valueByte[3]) << 24;
        int two = (0xff & valueByte[2]) << 16;
        int three = (0xff & valueByte[1]) << 8;
        int four = (0xff & valueByte[0]);

        int cout = one + two + three + four;

        System.out.println(cout);

    }

    public static byte[] toLHByteArray(int i32) {
        byte[] regs = new byte[4];
        regs[0] = (byte) (0xff & i32);
        regs[1] = (byte) (0xff & (i32 >> 8));
        regs[2] = (byte) (0xff & (i32 >> 16));
        regs[3] = (byte) (0xff & (i32 >> 24));
        return regs;
    }
}
